Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing /
Chapter 2 - Core Printing Features / Core Printing Features Reference
Application-Defined Functions / Message Override Functions


GXPrintingEvent

You must install an override function that QuickDraw GX invokes in response to the gxPrintingEvent message. Your override must match the following formal declaration:

OSErr MyPrintingEvent (EventRecord *anEventRecord,
                     Boolean filterEvent);
anEventRecord
A pointer to an event that occurred in a print dialog box.
filterEvent
A Boolean value that is true if the event needs to be filtered, and false if not.
function result
An error code. The value noErr indicates that the operation was successful.
DESCRIPTION
QuickDraw GX sends the gxPrintingEvent message whenever a specific event occurs in one of the print dialog boxes that is displayed for printing. You can override the gxPrintingEvent message to handle events, such as window update events, that occur during display of print dialog boxes. You cannot name your function GXPrintingEvent.

The default implementation of this message does nothing. You must override this message to correctly support print dialog boxes.

The anEventRecord parameter is a pointer to the event record. The event record contains information about what type of event occurred (a mouse-down, update, or key-down event, for example) and contains additional information associated with the event (for example, for a key-down event, the Event Manager also reports which key was pressed).

SPECIAL CONSIDERATIONS
You never send the gxPrintingEvent message yourself.

You typically create a total override of the gxPrintingEvent message.

RESULT CODES
gxSegmentLoadFailedErrA required code segment could not be found, or there was not enough memory to load it.
gxPrUserAbortErrThe user has canceled printing.
SEE ALSO
Overriding the gxPrintingEvent message is described in "Supporting QuickDraw GX Print Dialog Boxes," which begins on page 2-17.

The GXInstallApplicationOverride function is described on page 2-71.

The Event Manager, the EventRecord data type, and the DialogSelect function are discussed in the chapter "Event Manager" in Inside Macintosh: Macintosh Toolbox Essentials.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help